package cn.classyex.business.hr.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.classyex.business.hr.mapper.AdjustSalaryMapper;
import cn.classyex.business.hr.domain.AdjustSalary;
import cn.classyex.business.hr.service.IAdjustSalaryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 调薪记录管理Service业务层处理
 * 
 * @author yex
 * @date 2021-05-06
 */
@Service
public class AdjustSalaryServiceImpl implements IAdjustSalaryService 
{
    @Autowired
    private AdjustSalaryMapper adjustSalaryMapper;

    /**
     * 查询调薪记录管理
     * 
     * @param adjustSalaryId 调薪记录管理ID
     * @return 调薪记录管理
     */
    @Override
    public AdjustSalary selectAdjustSalaryById(Long adjustSalaryId)
    {
        return adjustSalaryMapper.selectAdjustSalaryById(adjustSalaryId);
    }

    /**
     * 查询调薪记录管理列表
     * 
     * @param adjustSalary 调薪记录管理
     * @return 调薪记录管理
     */
    @Override
    public List<AdjustSalary> selectAdjustSalaryList(AdjustSalary adjustSalary)
    {
        return adjustSalaryMapper.selectAdjustSalaryList(adjustSalary);
    }

    /**
     * 新增调薪记录管理
     * 
     * @param adjustSalary 调薪记录管理
     * @return 结果
     */
    @Override
    public int insertAdjustSalary(AdjustSalary adjustSalary)
    {
        adjustSalary.setCreateTime(DateUtils.getNowDate());
        return adjustSalaryMapper.insertAdjustSalary(adjustSalary);
    }

    /**
     * 修改调薪记录管理
     * 
     * @param adjustSalary 调薪记录管理
     * @return 结果
     */
    @Override
    public int updateAdjustSalary(AdjustSalary adjustSalary)
    {
        adjustSalary.setUpdateTime(DateUtils.getNowDate());
        return adjustSalaryMapper.updateAdjustSalary(adjustSalary);
    }

    /**
     * 删除调薪记录管理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAdjustSalaryByIds(String ids)
    {
        return adjustSalaryMapper.deleteAdjustSalaryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除调薪记录管理信息
     * 
     * @param adjustSalaryId 调薪记录管理ID
     * @return 结果
     */
    @Override
    public int deleteAdjustSalaryById(Long adjustSalaryId)
    {
        return adjustSalaryMapper.deleteAdjustSalaryById(adjustSalaryId);
    }
}
